<?php


namespace app\user\validate;


use think\Validate;

class OrderValidate extends Validate
{
    protected $rule = [
        'user_id' => 'require',
        'goods_id' => 'require',
        'address_id' => 'require',
        'term_id' => 'require',
        'num' => 'require',
        'dp' =>'require',
        'pay_type' => 'require',

    ];
    protected $message = [
        'user_id.require' => '用户id不能为空',
        'goods_id.require' => '商品id不能为空',
        'address_id.require' => '收货地址id不能为空',
        'term_id.require' => '规格id不能为空',
        'dp.require' => '首期月付不能为空',
        'num.require' => '数量不能为空',
        'pay_type.require' => '支付方式不能为空',


    ];
    protected $scene = [

        'add' => ['user_id','goods_id','address_id','term_id','dp','num','pay_type'],
    ];
}